package com.dreamwhale.machinery.goods.service;

import com.dreamwhale.machinery.goods.entity.MachineSell;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dreamwhale.machinery.goods.mapper.MachineSellMapper;
import org.apache.ibatis.annotations.Param;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 二手机械出售 服务类
 * </p>
 *
 * @author Author
 * @since 2020-05-28
 */
public interface MachineSellService extends IService<MachineSell> {

    /**
     * 发布二手机械
     *
     * @param machineSell
     * @return
     */
    int insertMachineSells(MachineSell machineSell);

    /**
     * 查询我的出售机械
     *
     * @param userId
     * @return
     */
    List<MachineSell> selectMachineSellMap(Integer userId);


    /**
     * 查询我的出售机械
     *
     * @param
     * @return
     */
    List<MachineSell> selectMachineSells(Integer infoId);


    /**
     * 查询二手机械出售详情
     *
     * @param infoId
     * @return
     */
    MachineSell selectMachineSellByTypeId(Integer infoId);

    /**
     * 首页-二手机械
     *
     * @param type
     * @param types
     * @param brandId
     * @param typeId
     * @return
     */
    List<MachineSell> selectMachineSellHome(Integer type, Integer types, Integer brandId, Integer typeId, String title);
}
